package com.cn.controller;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cn.domain.OrderEntity;
import com.cn.domain.ProductEntity;
import com.cn.service.OrderService;
import com.cn.service.ProductService;

@RestController  
public class ProductController {

 
    
    @Autowired
   private ProductService productService;
	
	@RequestMapping("/insertProduct") 
	public int insertProduct(ProductEntity product){
		if(product ==null){
			product = new ProductEntity();
		}
		product.setModifyTime(new Date());
		return this.productService.insertProductEntity(product);
	}
}
